//
//  SchollFriendCollectionViewCell.m
//  ECBBusinessCamp
//
//  Created by rimi on 16/6/28.
//  Copyright © 2016年 邓毕华. All rights reserved.
//

#import "SchollFriendCollectionViewCell.h"

@implementation SchollFriendCollectionViewCell

#pragma mark 🌷🌷🌷life cycle🌷🌷🌷
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // 添加视图
        [self addSubview:self.headImageView];
        [self addSubview:self.nameLabel];
        
        // 自动布局
        [_headImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.equalTo(self.mas_width);
            make.top.equalTo(self);
            make.centerX.equalTo(self);
        }];
        [_nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(self);
            make.bottom.equalTo(self);
        }];
    }
    return self;
}

#pragma mark 🌷🌷🌷getters and setters🌷🌷🌷
- (UIImageView *)headImageView {
    if (!_headImageView) {
        _headImageView = [[UIImageView alloc] init];
    }
    return _headImageView;
}
- (UILabel *)nameLabel {
    if (!_nameLabel) {
        _nameLabel = [[UILabel alloc] init];
        _nameLabel.textColor = RGB_COLOR(129, 129, 129, 1);
    }
    return _nameLabel;
}

@end
